package com.shortlink.common.constants;

public class RedisConstant {

    public static final String BLACKLIST_KEY_PREFIX="blacklist:ip:";


    public static final Long USER_LOGIN_TTL = 18000L;

    /**
     * 用户登录缓存标识
     */
    public static final String USER_LOGIN_KEY = "short-link:login:%s";

    /**
     * 链接跳转缓存标识
     */
    public static  final String LINK_JUMP_KEY="short-link:link:%s";

    /**
     * 链接跳转为空
     */
    public static  final String LINK_JUMP_NULL_KEY="short-link:link-null:%s";

    /**
     * 用户注册分布式锁
     */
    public static final String LOCK_USER_REGISTER_KEY = "short-link:lock_user-register:";

    /**
     * 分组创建分布式锁
     */
    public static final String LOCK_GROUP_CREATE_KEY = "short-link:lock_group-create:%s";

    /**
     * 链接跳转分布式锁
     */
    public static  final String LOCK_LINK_JUMP_KEY="short-link:lock_link:";

    /**
     * 短链接统计判断是否新 IP 缓存标识
     */
    public static final String SHORT_LINK_STATS_UIP_KEY = "short-link:stats:uip:";

    /**
     * 短链接统计判断是否新用户缓存标识
     */
    public static final String SHORT_LINK_STATS_UV_KEY = "short-link:stats:uv:";

    /**
     * 短链接监控消息保存队列 Topic 缓存标识
     */
    public static final String SHORT_LINK_STATS_STREAM_TOPIC_KEY = "short-link:stats-stream";

    /**
     * 短链接监控消息保存队列 Group 缓存标识
     */
    public static final String SHORT_LINK_STATS_STREAM_GROUP_KEY = "short-link:stats-stream:only-group";

}
